package responsechain.handeler.impl;

import responsechain.handeler.Handler;
import responsechain.handeler.Interview;

public class PublicRelationPart extends Handler {
    @Override
    public boolean handle(Interview interview) {
        String name = interview.getName();
        log.i(name + ":正在 " + getPartName() + " 进行招聘");
        if (!interview.isCanDrive()) {
            log.w(name + ": 不能开车不满足");
            return next(interview);
        }
        if (interview.getAverage() < 70) {
            log.w(name + ": 平均成绩不满足");
            return next(interview);
        }
        return offer(interview) || next(interview);
    }

    @Override
    public int getHc() {
        return 2;
    }

    @Override
    protected String getPartName() {
        return "公关部";
    }
}
